From 03e7c7fab18c6be39b6089c0db9ca35ef39fd142 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Fri, 6 Mar 2020 04:31:30 +0100 Subject: [PATCH] treepath: Use g_renew() --- gtk/gtktreemodel.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/gtk/gtktreemodel.c b/gtk/gtktreemodel.c index 226791ab5a..6a34674749 100644 --- a/gtk/gtktreemodel.c +++ b/gtk/gtktreemodel.c @@ -802,12 +802,8 @@ gtk_tree_path_append_index (GtkTreePath *path, if (path->depth == path->alloc) { - gint *indices; path->alloc = MAX (path->alloc * 2, 1); - indices = g_new (gint, path->alloc); - memcpy (indices, path->indices, path->depth * sizeof (gint)); - g_free (path->indices); - path->indices = indices; + path->indices = g_renew (gint, path->indices, path->alloc); } path->depth += 1; -- 2.30.2